<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSummer2022Reward extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('summer2022_reward', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 50)->default('')->comment("奖励名称");
            $table->string('picture', 200)->default('')->comment("奖励图片");
            $table->enum('type', ['房间挂件', '气泡', '昵称特效', '声波', '昵称挂件'])->comment("奖励类型");
            $table->enum('price', ['高', '中', '低'])->default('高')->comment('奖励价格');
            $table->unsignedTinyInteger('order')->default(0)->comment('排序');

            $table->dateTime('created_at', 6)->default(DB::raw('CURRENT_TIMESTAMP(6)'))->comment("创建时间");
            $table->dateTime('updated_at', 6)->default(DB::raw('CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)'))->comment("更新时间");
//            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('summer2022_reward');
    }
}
